﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BatchOrderList.aspx.cs" EnableEventValidation="false" Inherits="WMS6.Web.Outbound.BatchOrderList" meta:resourcekey="Page" %>
<%@ PreviousPageType VirtualPath="~/Outbound/BatchOrderQuery.aspx" %>
<%@ Register src="../UserControls/Pager.ascx" tagname="Pager" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>BatchOrderList</title>
     <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
     <link href="../Css/style.css" type="text/css" rel="stylesheet" />
     <script src="../Js/jquery.js" type="text/javascript"></script>
    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script> 
    <script src="../Js/checkbox.js" type="text/javascript"></script>
    <script src="../Js/util.js" type="text/javascript"></script>
    <script src="../Js/InitPage.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initListPage();
        }
        
        function returnSearch()
        {
            var from = document.getElementById("hdnFrom").value;
            if(from != "")
            {
                window.location.href = "BatchOrderQuery.aspx";
            }
            else
            {
                window.history.go(-1);
            }
        }
         function showAction()
		{	
			var pos = getElementPos("btnAction");	
			document.getElementById("actionDiv").style.top = pos.y+17;
			document.getElementById("actionDiv").style.left = pos.x;  			
			document.getElementById("hiddenFlag").value = '1';
		}		
       function hiddenDiv()
		{
			var flag = document.getElementById("hiddenFlag").value
			if(flag == "1")
			{
				document.getElementById("actionDiv").style.display = "block";
				document.getElementById("hiddenFlag").value = '0';
			}
			else 
			{
				document.getElementById("actionDiv").style.display = "none";
			}
        }

        //显示 报表 DIV
        function showReport() {
            var pos = getElementPos("htmlbtnReport");
            document.getElementById("reportDiv").style.top = pos.y + 17;
            document.getElementById("reportDiv").style.left = pos.x;
            document.getElementById("hiddenReportFlag").value = '1';
        }


        //隐藏 报表 DIV    
        function hiddenReportDiv() {
            var flag = document.getElementById("hiddenReportFlag").value
            if (flag == "1") {
                document.getElementById("reportDiv").style.display = "block";
                document.getElementById("hiddenReportFlag").value = '0';
            }
            else {
                document.getElementById("reportDiv").style.display = "none";
            }
        }

        //WAVE批量送货单
        function popPrintWaveShipment() 
        {
            var waveIDs = document.getElementById("hdnWaveIDs").value;
            window.open('../Common/PrintReport.aspx?rtype=PRINTWAVESHIPMENT&waveIDs=' + escape(waveIDs), 'PrintWindow', 'width=860,height=610,top=50,left=50,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no,status=no');
        }

        function confirmMsg(code) 
        {
            if (code == "F7300_001") 
            {
                if (confirm('<%=GetGlobalMsgResource("F7300_001") %>')) 
                {
                    return true;
                }
                else 
                {
                    return false;
                }
            } 
        } 
    </script>
</head>
<body>
    <form id="F7032" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_List_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblBatchOrderList" runat="server" CssClass="label_header" Text="批量订单"
                            meta:resourcekey="lblBatchOrderList"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnNew" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnNew%>"
                            Enabled="False" OnClientClick="javascript:window.location.href='BatchOrder.aspx?from=list';return false;" />
                    </td>
                    <td>
                        <asp:Button ID="btnEdit" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnEdit%>"
                            Enabled="False" OnClick="btnEdit_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnDelete" runat="server" CssClass="button" Enabled="False" Text="<%$Resources:ButtonResource,btnDelete%>"
                            AccessKey="d" OnClientClick="if(confirmMsg('F7300_001'))return true; else return false;"
                            OnClick="btnDelete_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnRefresh" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnRefresh%>"
                            AccessKey="d" Enabled="False" OnClick="btnRefresh_Click" />
                    </td>
                    <td>
                        <input id="btnAction" type="button" runat="server" value="<%$Resources:ButtonResource,btnAction%>"
                            class="button" onclick="showAction();" />
                    </td>
                    <td> 
                        <input id="htmlbtnReport" type="button" runat="server" value="<%$Resources:ButtonResource,btnReport%>" 
                            class="button"  onclick="showReport();" /> 
                    </td>
                </tr>
            </table>
        </div>
        <div class="blank8">
        </div>
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                <div id="div_List">
                    <div id="div_List_msg">
                        <asp:Label ID="lblMsg" runat="server" CssClass="label_message"></asp:Label>
                    </div>
                    <asp:GridView ID="gvBatchOrder" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                        OnSorting="gvBatchOrder_Sorting" CssClass="gridview" OnInit="gvBatchOrder_Init"
                        OnRowDataBound="gvBatchOrder_RowDataBound" DataKeyNames="WAVE_ID,STATUS" PageSize="20"
                        Width="850px" meta:resourcekey="gvBatchOrder">
                        <FooterStyle CssClass="GridViewFooterStyle" />
                        <RowStyle CssClass="GridViewRowStyle" />
                        <HeaderStyle CssClass="GridViewHeaderStyle" />
                        <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                        <Columns>
                            <asp:BoundField HeaderText="序号" FooterText="序号" meta:resourcekey="No">
                                <ItemStyle CssClass="GridViewRowWidth_40" />
                            </asp:BoundField>
                            <asp:TemplateField meta:resourcekey="TemplateField">
                                <HeaderTemplate>
                                    <img src="../Images/gvSettingpic.gif" id="img01" class="gvSettingImg" onclick="gvUserSetting('7032','gvBatchOrder');"
                                        onmouseover="showGVUserSettingAlt(this);" alt="customize list" />
                                    <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvBatchOrder');"
                                        meta:resourcekey="CheckBox1" />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="chbSelect" runat="server" meta:resourcekey="chbSelect" />
                                </ItemTemplate>
                                <FooterTemplate>
                                    <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvBatchOrder');"
                                        meta:resourcekey="CheckBox2" />
                                </FooterTemplate>
                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="批量订单编号" FooterText="批量订单编号" SortExpression="WAVE_ID"
                                meta:resourcekey="WAVE_ID">
                                <ItemTemplate>
                                    <asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("WAVE_ID") %>' NavigateUrl='<%# FormatUrl("~/Outbound/BatchOrder.aspx?from=list&ID={0}",Eval("WAVE_ID").ToString()) %>'
                                        Target="_self" CssClass="hyperlink" meta:resourcekey="HyperLink1"></asp:HyperLink>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_150" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="WAVE_TYPE" HeaderText="波次类型" FooterText="WAVE_TYPE" SortExpression="WAVE_TYPE"
                                meta:resourcekey="WAVE_TYPE">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:BoundField DataField="STATUSD" HeaderText="状态" FooterText="状态" SortExpression="STATUSD"
                                meta:resourcekey="STATUS">
                                <ItemStyle CssClass="GridViewRowWidth_150" />
                            </asp:BoundField>
                            <asp:BoundField DataField="DESCR" HeaderText="描述" FooterText="描述" SortExpression="DESCR"
                                meta:resourcekey="DESCR">
                                <ItemStyle CssClass="GridViewRowWidth_200" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CREATED_BY" HeaderText="创建人" FooterText="创建人" SortExpression="CREATED_BY"
                                meta:resourcekey="CREATED_BY">
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                            <asp:TemplateField FooterText="创建日期" HeaderText="创建日期" SortExpression="CREATED_DATE" meta:resourcekey="CREATED_DATE">
                                <ItemTemplate>
                                    <asp:Label ID="lblCreateDate" runat="server" Text='<%# GetPreferenceShortDate(Eval("CREATED_DATE").ToString()) %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="GridViewRowWidth_150" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>
                <div id="div_pager">
                    <uc1:Pager ID="PagerFooter" runat="server" OnFirst="btnFirst_Click" OnPrevious="btnPrevious_Click"
                        OnNext="btnNext_Click" OnLast="btnLast_Click" OnGoTo="GoTo_Click" />
                </div>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnEdit" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
        <div id="div_List_bottom">
            <table>
                <tr>
                    <td>
                        <asp:Button ID="btnSearch" runat="server" Text="<%$Resources:ButtonResource,btnNewSearch%>"
                            CssClass="button" Enabled="False" OnClientClick="javascript:window.location.href='BatchOrderQuery.aspx';return false;" />
                    </td>
                    <td>
                        <asp:Button ID="btnReSearch" runat="server" Text="<%$Resources:ButtonResource,btnReSearch%>"
                            CssClass="button" Enabled="False" OnClientClick="javascript:returnSearch();return false;"
                            meta:resourcekey="btnReSearch" />
                    </td>
                    <td>
                        <asp:Button ID="btnList" runat="server" Text="<%$Resources:ButtonResource,btnList%>"
                            CssClass="button" Enabled="False" OnClick="btnList_Click" />
                    </td>
                    <td>
                        <asp:Button ID="btnExport" runat="server" Text="<%$Resources:ButtonResource,btnExport%>"
                            CssClass="button" Enabled="False" OnClick="btnExport_Click" />
                    </td>
                </tr>
            </table>
        </div>
        <div id="actionDiv" style="background-color: #FFFFFF; position: absolute; display: none;">
            <table width="105" border="0" cellspacing="0" cellpadding="0" id="divcontent_menu">
                <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnPreallocate" runat="server" visible="true" >
                        <asp:LinkButton ID="lnkbtnPreallocate" runat="server" Text="预分配"></asp:LinkButton>
                    </td>
               </tr>
               <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnAllocate" runat="server" visible="true" >
                        <asp:LinkButton ID="lnkbtnAllocate" runat="server" Text="分配" ></asp:LinkButton>
                    </td>
               </tr>
               <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnReConfirm" runat="server" visible="true" >
                        <asp:LinkButton ID="lnkbtnReConfirm" runat="server" Text="复核" OnClientClick="javascript:window.location.href='OutboundReview.aspx';return false;"></asp:LinkButton>
                    </td>
               </tr>
               <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnPackaging" runat="server" visible="true" >
                        <asp:LinkButton ID="lnkbtnPackaging" runat="server" Text="称重" OnClientClick="javascript:window.location.href='OutboundWeightReview.aspx';return false;"></asp:LinkButton>
                    </td>
               </tr>
                <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnCloseOrder" runat="server" visible="false" >
                        <asp:LinkButton ID="lnkbtnCloseOrder" runat="server" Text="<%$Resources:ButtonResource,lnkbtnClose%>"
                            OnClick="lnkbtnClosed_Click"></asp:LinkButton>
                    </td>
               </tr>
            </table>
        </div>
        <div id="reportDiv" style="background-color: #FFFFFF; position: absolute; display: none;">
            <table width="105" border="0" cellspacing="0" cellpadding="0" id="divcontent_menu2">
                <%--<tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnPrintWavePickAdvice" runat="server" visible="false">
                        <asp:LinkButton ID="lnkbtnPrintWavePickAdvice" runat="server" Text="<%$Resources:ButtonResource,lnkbtnPrintPick%>"
                            OnClick="lnkbtnPrintWavePickAdvice_Click"></asp:LinkButton>
                    </td>
                </tr>--%>
                <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnPrintWaveShipment" runat="server" visible="false">
                        <asp:LinkButton ID="lnkbtnPrintWaveShipment" runat="server" Text="<%$Resources:ButtonResource,lnkbtnPrintWaveShipment%>"
                            OnClick="lnkbtnPrintWaveShipment_Click"></asp:LinkButton>
                    </td>
                </tr>
                <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnPrintShippingOrder" runat="server" visible="true">
                        <asp:LinkButton ID="lnkbtnPrintShippingOrder" runat="server" Text="发货订单"></asp:LinkButton>
                    </td>
                </tr>
                <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnPrintOrderInvoice" runat="server" visible="true">
                        <asp:LinkButton ID="lnkbtnPrintOrderInvoice" runat="server" Text="订单发票"></asp:LinkButton>
                    </td>
                </tr>
                <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnPrintDeliveryOrder" runat="server" visible="true">
                        <asp:LinkButton ID="lnkbtnPrintDeliveryOrder" runat="server" Text="交接单"></asp:LinkButton>
                    </td>
                </tr>
                <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnPrintExpressOrder" runat="server" visible="true">
                        <asp:LinkButton ID="lnkbtnPrintExpressOrder" runat="server" Text="快递单"></asp:LinkButton>
                    </td>
                </tr>
                <tr class="bg2" onmouseover="this.className='bg1'" onmouseout="this.className='bg2'">
                    <td class="line" id="tdlnkbtnPrintPicking" runat="server" visible="true">
                        <asp:LinkButton ID="lnkbtnPrintPicking" runat="server" Text="抱缺拣货"></asp:LinkButton>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <input type="hidden" id="hiddenFlag" runat="server" />
    <input type="hidden" id="hdnFrom" runat="server" />
    <input type="hidden" id="hdnActionID" runat="server" />
    <input type="hidden" id="hiddenReportFlag" runat="server" />
    <input type="hidden" id="hdnWaveIDs" runat="server" />
    </form>
</body>
</html>
<script language="javascript" type="text/javascript" event="onclick" for="document">
		<!--
			hiddenDiv();
			hiddenReportDiv();
		//-->
</script>